package io.mybatis.example.springboot.model;

import io.mybatis.provider.Entity;
import org.apache.ibatis.type.JdbcType;

import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * sys_login_info - 系统访问记录
 *
 * @author mkj
 */
@Getter
@Setter
@Entity.Table("sys_login_info" remark = "系统访问记录", autoResultMap = true)
public class SysLoginInfoDO {
  @Entity.Column(value = "info_id", id = true, remark = "访问ID", updatable = false, insertable = false)
  private Long infoId;

  @Entity.Column(value = "user_name", remark = "用户账号")
  private String userName;

  @Entity.Column(value = "ipaddr", remark = "登录IP地址")
  private String ipaddr;

  @Entity.Column(value = "login_location", remark = "登录地点")
  private String loginLocation;

  @Entity.Column(value = "browser", remark = "浏览器类型")
  private String browser;

  @Entity.Column(value = "os", remark = "操作系统")
  private String os;

  @Entity.Column(value = "status", remark = "登录状态（0成功 1失败）")
  private String status;

  @Entity.Column(value = "msg", remark = "提示消息")
  private String msg;

  @Entity.Column(value = "login_time", remark = "访问时间", jdbcType = JdbcType.TIMESTAMP)
  private Date loginTime;

}
